<?php
/**
 * Created by PhpStorm.
 * User: qzy008
 * Date: 2018/9/19
 * Time: 17:48
 */

namespace app\api\controller;

use app\api\service\Token as TokenService;
use app\common\controller\CommonController;
use think\Request;

class BaseController extends CommonController
{
    public function __construct()
    {
        parent::__construct();
        $not_check = [
            '/api/v1/admin/login'
        ];
        $route_url = Request::instance()->url();
        if (!in_array($route_url, $not_check)) {
            TokenService::checkToken();
        }
    }
}